package com.yunyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;

import java.util.Date;
import lombok.Data;

import javax.validation.Valid;

/**
 * 会诊病例
 * @TableName emr_case
 */
@TableName(value ="emr_case")
@Data
public class EmrCase implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id")
    private String id;

    /**
     * 会诊类别
     */
    @TableField(value = "case_type")
    private String case_type;

    /**
     * 诊断号 0:已诊断 1:未诊断
     */
    @TableField(value = "no")
    private String no;

    /**
     * 原病理号
     */
    @TableField(value = "case_no")
    private String case_no;

    /**
     * 患者姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private String sex;

    /**
     * 年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 年龄单位
     */
    @TableField(value = "age_unit")
    private String age_unit;

    /**
     * 民族
     */
    @TableField(value = "nation")
    private String nation;

    /**
     * 身份证号
     */
    @TableField(value = "idcard")
    private String idcard;

    /**
     * 患者手机号
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 送检日期
     */
    @TableField(value = "send_date")
    private LocalDate send_date;

    /**
     * 送检医院
     */
    @TableField(value = "send_hospital")
    private String send_hospital;

    /**
     * 送检科室
     */
    @TableField(value = "send_depart")
    private String send_depart;

    /**
     * 送检医生
     */
    @TableField(value = "send_doctor")
    private String send_doctor;

    /**
     * 检查号
     */
    @TableField(value = "inspect_no")
    private String inspect_no;

    /**
     * 住院号
     */
    @TableField(value = "inpatient_no")
    private String inpatient_no;

    /**
     * 病区号
     */
    @TableField(value = "area_no")
    private String area_no;

    /**
     * 床号
     */
    @TableField(value = "bed_no")
    private String bed_no;

    /**
     * 病理分类
     */
    @TableField(value = "pathology_type")
    private String pathology_type;

    /**
     * 取材部位
     */
    @TableField(value = "specimen")
    private String specimen;

    /**
     * 临床资料
     */
    @TableField(value = "clinical_record")
    private String clinical_record;

    /**
     * 病史信息
     */
    @TableField(value = "medical_history")
    private String medical_history;

    /**
     * 手术所见
     */
    @TableField(value = "operation_descript")
    private String operation_descript;

    /**
     * 临床诊断
     */
    @TableField(value = "clinical_diagnosis")
    private String clinical_diagnosis;

    /**
     * 大体所见
     */
    @TableField(value = "gross_descript")
    private String gross_descript;

    /**
     * 大体图像
     */
    @TableField(value = "gross_image")
    private String gross_image;

    /**
     * 免疫组化
     */
    @TableField(value = "ihc")
    private String ihc;

    /**
     * 初诊意见
     */
    @TableField(value = "first_diagnosis")
    private String first_diagnosis;

    /**
     * 附件/影像资料
     */
    @TableField(value = "content")
    private String content;

    /**
     * 备注信息
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 状态
     */
    @TableField(value = "status")
    private String status;

    /**
     * 会诊专家id
     */
    @TableField(value = "expert_id")
    private String expert_id;

    @TableField(exist = false)
    private String pathology;

    /**
     * 会诊专家姓名
     */
    @TableField(value = "expert_name")
    private String expert_name;

    /**
     * 诊断意见
     */
    @TableField(value = "expert_diagnosis")
    private String expert_diagnosis;

    /**
     * 报告完成时间
     */
    @TableField(value = "expert_date")
    private LocalDateTime expert_date;

    /**
     *  会诊费用
     */
    @TableField(value = "case_fee")
    private BigDecimal case_fee;

    /**
     * 是否支付
     */
    @TableField(value = "is_pay")
    private String is_pay;

    /**
     * 业务类型
     */
    @TableField(value = "account_type")
    private String account_type;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String create_by;

    /**
     * 创建时间
     */
    @TableField(value = "create_date")
    private LocalDateTime create_date;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private String update_by;

    /**
     * 更新时间
     */
    @TableField(value = "update_date")
    private LocalDateTime update_date;

    /**
     * 删除标记
     */
    @TableField(value = "del_flag")
    private String del_flag;

    /**
     * 医院账户
     */
    @TableField(value = "account_id")
    private String account_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private List<EmrCaseMsg> emrCaseMsgList;

    //分页页面
    @TableField(exist = false)
    private int page ;
    //每页显示条数
    @TableField(exist = false)
    private int rows ;



    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmrCase other = (EmrCase) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCase_type() == null ? other.getCase_type() == null : this.getCase_type().equals(other.getCase_type()))
            && (this.getNo() == null ? other.getNo() == null : this.getNo().equals(other.getNo()))
            && (this.getCase_no() == null ? other.getCase_no() == null : this.getCase_no().equals(other.getCase_no()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getAge_unit() == null ? other.getAge_unit() == null : this.getAge_unit().equals(other.getAge_unit()))
            && (this.getNation() == null ? other.getNation() == null : this.getNation().equals(other.getNation()))
            && (this.getIdcard() == null ? other.getIdcard() == null : this.getIdcard().equals(other.getIdcard()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getSend_date() == null ? other.getSend_date() == null : this.getSend_date().equals(other.getSend_date()))
            && (this.getSend_hospital() == null ? other.getSend_hospital() == null : this.getSend_hospital().equals(other.getSend_hospital()))
            && (this.getSend_depart() == null ? other.getSend_depart() == null : this.getSend_depart().equals(other.getSend_depart()))
            && (this.getSend_doctor() == null ? other.getSend_doctor() == null : this.getSend_doctor().equals(other.getSend_doctor()))
            && (this.getInspect_no() == null ? other.getInspect_no() == null : this.getInspect_no().equals(other.getInspect_no()))
            && (this.getInpatient_no() == null ? other.getInpatient_no() == null : this.getInpatient_no().equals(other.getInpatient_no()))
            && (this.getArea_no() == null ? other.getArea_no() == null : this.getArea_no().equals(other.getArea_no()))
            && (this.getBed_no() == null ? other.getBed_no() == null : this.getBed_no().equals(other.getBed_no()))
            && (this.getPathology_type() == null ? other.getPathology_type() == null : this.getPathology_type().equals(other.getPathology_type()))
            && (this.getSpecimen() == null ? other.getSpecimen() == null : this.getSpecimen().equals(other.getSpecimen()))
            && (this.getClinical_record() == null ? other.getClinical_record() == null : this.getClinical_record().equals(other.getClinical_record()))
            && (this.getMedical_history() == null ? other.getMedical_history() == null : this.getMedical_history().equals(other.getMedical_history()))
            && (this.getOperation_descript() == null ? other.getOperation_descript() == null : this.getOperation_descript().equals(other.getOperation_descript()))
            && (this.getClinical_diagnosis() == null ? other.getClinical_diagnosis() == null : this.getClinical_diagnosis().equals(other.getClinical_diagnosis()))
            && (this.getGross_descript() == null ? other.getGross_descript() == null : this.getGross_descript().equals(other.getGross_descript()))
            && (this.getGross_image() == null ? other.getGross_image() == null : this.getGross_image().equals(other.getGross_image()))
            && (this.getIhc() == null ? other.getIhc() == null : this.getIhc().equals(other.getIhc()))
            && (this.getFirst_diagnosis() == null ? other.getFirst_diagnosis() == null : this.getFirst_diagnosis().equals(other.getFirst_diagnosis()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getExpert_id() == null ? other.getExpert_id() == null : this.getExpert_id().equals(other.getExpert_id()))
            && (this.getExpert_name() == null ? other.getExpert_name() == null : this.getExpert_name().equals(other.getExpert_name()))
            && (this.getExpert_diagnosis() == null ? other.getExpert_diagnosis() == null : this.getExpert_diagnosis().equals(other.getExpert_diagnosis()))
            && (this.getExpert_date() == null ? other.getExpert_date() == null : this.getExpert_date().equals(other.getExpert_date()))
            && (this.getCase_fee() == null ? other.getCase_fee() == null : this.getCase_fee().equals(other.getCase_fee()))
            && (this.getIs_pay() == null ? other.getIs_pay() == null : this.getIs_pay().equals(other.getIs_pay()))
            && (this.getAccount_type() == null ? other.getAccount_type() == null : this.getAccount_type().equals(other.getAccount_type()))
            && (this.getCreate_by() == null ? other.getCreate_by() == null : this.getCreate_by().equals(other.getCreate_by()))
            && (this.getCreate_date() == null ? other.getCreate_date() == null : this.getCreate_date().equals(other.getCreate_date()))
            && (this.getUpdate_by() == null ? other.getUpdate_by() == null : this.getUpdate_by().equals(other.getUpdate_by()))
            && (this.getUpdate_date() == null ? other.getUpdate_date() == null : this.getUpdate_date().equals(other.getUpdate_date()))
            && (this.getDel_flag() == null ? other.getDel_flag() == null : this.getDel_flag().equals(other.getDel_flag()))
            && (this.getAccount_id() == null ? other.getAccount_id() == null : this.getAccount_id().equals(other.getAccount_id()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCase_type() == null) ? 0 : getCase_type().hashCode());
        result = prime * result + ((getNo() == null) ? 0 : getNo().hashCode());
        result = prime * result + ((getCase_no() == null) ? 0 : getCase_no().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getAge_unit() == null) ? 0 : getAge_unit().hashCode());
        result = prime * result + ((getNation() == null) ? 0 : getNation().hashCode());
        result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getSend_date() == null) ? 0 : getSend_date().hashCode());
        result = prime * result + ((getSend_hospital() == null) ? 0 : getSend_hospital().hashCode());
        result = prime * result + ((getSend_depart() == null) ? 0 : getSend_depart().hashCode());
        result = prime * result + ((getSend_doctor() == null) ? 0 : getSend_doctor().hashCode());
        result = prime * result + ((getInspect_no() == null) ? 0 : getInspect_no().hashCode());
        result = prime * result + ((getInpatient_no() == null) ? 0 : getInpatient_no().hashCode());
        result = prime * result + ((getArea_no() == null) ? 0 : getArea_no().hashCode());
        result = prime * result + ((getBed_no() == null) ? 0 : getBed_no().hashCode());
        result = prime * result + ((getPathology_type() == null) ? 0 : getPathology_type().hashCode());
        result = prime * result + ((getSpecimen() == null) ? 0 : getSpecimen().hashCode());
        result = prime * result + ((getClinical_record() == null) ? 0 : getClinical_record().hashCode());
        result = prime * result + ((getMedical_history() == null) ? 0 : getMedical_history().hashCode());
        result = prime * result + ((getOperation_descript() == null) ? 0 : getOperation_descript().hashCode());
        result = prime * result + ((getClinical_diagnosis() == null) ? 0 : getClinical_diagnosis().hashCode());
        result = prime * result + ((getGross_descript() == null) ? 0 : getGross_descript().hashCode());
        result = prime * result + ((getGross_image() == null) ? 0 : getGross_image().hashCode());
        result = prime * result + ((getIhc() == null) ? 0 : getIhc().hashCode());
        result = prime * result + ((getFirst_diagnosis() == null) ? 0 : getFirst_diagnosis().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getExpert_id() == null) ? 0 : getExpert_id().hashCode());
        result = prime * result + ((getExpert_name() == null) ? 0 : getExpert_name().hashCode());
        result = prime * result + ((getExpert_diagnosis() == null) ? 0 : getExpert_diagnosis().hashCode());
        result = prime * result + ((getExpert_date() == null) ? 0 : getExpert_date().hashCode());
        result = prime * result + ((getCase_fee() == null) ? 0 : getCase_fee().hashCode());
        result = prime * result + ((getIs_pay() == null) ? 0 : getIs_pay().hashCode());
        result = prime * result + ((getAccount_type() == null) ? 0 : getAccount_type().hashCode());
        result = prime * result + ((getCreate_by() == null) ? 0 : getCreate_by().hashCode());
        result = prime * result + ((getCreate_date() == null) ? 0 : getCreate_date().hashCode());
        result = prime * result + ((getUpdate_by() == null) ? 0 : getUpdate_by().hashCode());
        result = prime * result + ((getUpdate_date() == null) ? 0 : getUpdate_date().hashCode());
        result = prime * result + ((getDel_flag() == null) ? 0 : getDel_flag().hashCode());
        result = prime * result + ((getAccount_id() == null) ? 0 : getAccount_id().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", case_type=").append(case_type);
        sb.append(", no=").append(no);
        sb.append(", case_no=").append(case_no);
        sb.append(", name=").append(name);
        sb.append(", sex=").append(sex);
        sb.append(", age=").append(age);
        sb.append(", age_unit=").append(age_unit);
        sb.append(", nation=").append(nation);
        sb.append(", idcard=").append(idcard);
        sb.append(", mobile=").append(mobile);
        sb.append(", send_date=").append(send_date);
        sb.append(", send_hospital=").append(send_hospital);
        sb.append(", send_depart=").append(send_depart);
        sb.append(", send_doctor=").append(send_doctor);
        sb.append(", inspect_no=").append(inspect_no);
        sb.append(", inpatient_no=").append(inpatient_no);
        sb.append(", area_no=").append(area_no);
        sb.append(", bed_no=").append(bed_no);
        sb.append(", pathology_type=").append(pathology_type);
        sb.append(", specimen=").append(specimen);
        sb.append(", clinical_record=").append(clinical_record);
        sb.append(", medical_history=").append(medical_history);
        sb.append(", operation_descript=").append(operation_descript);
        sb.append(", clinical_diagnosis=").append(clinical_diagnosis);
        sb.append(", gross_descript=").append(gross_descript);
        sb.append(", gross_image=").append(gross_image);
        sb.append(", ihc=").append(ihc);
        sb.append(", first_diagnosis=").append(first_diagnosis);
        sb.append(", content=").append(content);
        sb.append(", remarks=").append(remarks);
        sb.append(", status=").append(status);
        sb.append(", expert_id=").append(expert_id);
        sb.append(", expert_name=").append(expert_name);
        sb.append(", expert_diagnosis=").append(expert_diagnosis);
        sb.append(", expert_date=").append(expert_date);
        sb.append(", case_fee=").append(case_fee);
        sb.append(", is_pay=").append(is_pay);
        sb.append(", account_type=").append(account_type);
        sb.append(", create_by=").append(create_by);
        sb.append(", create_date=").append(create_date);
        sb.append(", update_by=").append(update_by);
        sb.append(", update_date=").append(update_date);
        sb.append(", del_flag=").append(del_flag);
        sb.append(", account_id=").append(account_id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
    @TableField(exist = false)
    private String accountId;

    @TableField(value = "application_date")
    private Date application_date;

    /**
     * 婚姻状况
     */
    @TableField(value = "marital_status")
    private String maritalStatus;

    @TableField(value = "reason")
    private String reason;
}